package org.lightweightimageviewer.liv.prefs;

import javax.swing.*;

import static org.lightweightimageviewer.liv.UserPreferences.properties;

import static org.lightweightimageviewer.liv.UserPreferences.PropertyKeys.*;
/**
 * Nowhere near done!
 * @author Steven
 *
 */
public class PreferencesGUI extends JFrame {
	private static final long serialVersionUID = 1L;
	private static final String TITLE = "User Preferences";
    /** Creates new form PreferencesGUI3 */
    public PreferencesGUI() {
        initComponents();
    }
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new PreferencesGUI().setVisible(true);
            }
        });
    }

    private void initComponents() {
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(fetchBackwardField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(fetchForwardLabel))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(nextKeysField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(fetchBackwardLabel))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(fetchForwardField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(nextKeysLabel))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(previousKeysField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(previousKeysLabel))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(scaleFactorField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(scaleFactorLabel))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(slideshowKeysField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(slideshowKeysLabel))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(slideshowDelayField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(slideshowDelayLabel)))
                .addContainerGap(303, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fetchBackwardField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(fetchForwardLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nextKeysField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(fetchBackwardLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fetchForwardField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(nextKeysLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(previousKeysField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(previousKeysLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(scaleFactorField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(scaleFactorLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(slideshowKeysField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(slideshowKeysLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(slideshowDelayField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(slideshowDelayLabel))
                .addContainerGap(124, Short.MAX_VALUE))
        );
        pack();
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private final JLabel fetchForwardLabel = new JLabel(fetchForward.getExplanation());
    private final JLabel fetchBackwardLabel = new JLabel(fetchBackward.getExplanation());
    private final JLabel nextKeysLabel = new JLabel(next.getExplanation());
    private final JLabel previousKeysLabel = new JLabel(previous.getExplanation());
    private final JLabel scaleFactorLabel = new JLabel(scale.getExplanation());
    private final JLabel slideshowKeysLabel = new JLabel(slideshow.getExplanation());
    private final JLabel slideshowDelayLabel = new JLabel(slideshowIncrement.getExplanation());
    private JTextField fetchForwardField = new JTextField(properties.getProperty(fetchForward.name()));
    private JTextField fetchBackwardField = new JTextField(properties.getProperty(fetchBackward.name()));
    private JTextField nextKeysField = new JTextField(properties.getProperty(next.name()));
    private JTextField previousKeysField = new JTextField(properties.getProperty(previous.name()));
    private JTextField scaleFactorField = new JTextField(properties.getProperty(scale.name()));
    private JTextField slideshowKeysField = new JTextField(properties.getProperty(slideshow.name()));
    private JTextField slideshowDelayField = new JTextField(properties.getProperty(slideshowIncrement.name()));
}
